package com.example.sjjg.utest.model

import androidx.databinding.ObservableField
import androidx.databinding.ObservableInt

class DataModel {
    var status  : ObservableField<String>   = ObservableField("default")
    var value   : ObservableInt             = ObservableInt(0)
    var data    : ArrayList<Int>            = ArrayList<Int>()

    fun addData(x : Int) {
        data.add(x)
    }

    fun incValue(){
        val v = value.get()
        value.set(v + 1)
    }
    fun refreshStatus(newStatus : String){
        status.set(newStatus)
    }
    fun clear(){
        status.set("default")
    }
}